2 <TITLE>Quadratic hashing: insertion
7 <A HREF="../../images/handbook.gif"><IMG SRC="../../images/handbook2.gif" align=left></A>
8 <A HREF="../../hbook.html">
9 <IMG SRC="../../images/home_g.gif" hspace = 15 vspace = 4></A><BR>
10 <A HREF="../../expand.html">
11 <IMG SRC="../../images/contents_g.gif" hspace = 15 vspace = 4></A><BR>
12 <A HREF="../../search_a.html">
13 <IMG SRC="../../images/chapter_g.gif" hspace = 15 vspace = 4></A><BR>
14 <A HREF="311.ins.c.html"><IMG SRC="../../images/prevalg_g.gif" hspace = 15 vspace = 4></A><BR>
15 <A HREF="311c.srch.c.html">
16 <IMG SRC="../../images/nextalg_g.gif" hspace = 15 vspace = 4></A><BR>
19 <H2><B>Quadratic hashing: insertion
28 procedure insert( key : typekey; var r : dataarray );
32 i := hashfunction( key );
34 while (inc<m) and (not empty(r[i])) and
35 (not deleted(r[i])) and (r[i].k<>key) do begin
39 if empty(r[i]) or deleted(r[i]) then
45 else Error {*** table full, or key already in table ***};
47 </XMP></TD></TR></TABLE>
49 <H3><A HREF="ftp://sunsite.dcc.uchile.cl/pub/users/rbaeza/handbook/algs/3/336.ins.p"><IMG SRC="../../images/ftp.xbm" hspace=10>Pascal</A> source (336.ins.p) </H3></CENTER>
51 <IMG SRC="../../images/aw3.gif" align=left><H5><BR>
52 © <A HREF="http://aw.com">Addison-Wesley </A>Publishing Co. Inc.